package com.grandstream.website.controller;



import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * ClassName:SystemController
 * @Description: TODO(这里用一句话描述作用) 
 * @author   czheng
 * @version 1.0 2011-5-18
 * @since 1.0
 * @see
 */
@Controller
public class SystemController {

	//后台主页面
	@RequestMapping(value="/")
	public String main(Model model){
		return "home";
	}
	
	
	@RequestMapping(value="/top")
	public String top(){
		return "system/top";
	}
	
	@RequestMapping(value="/system_main")
	public String main(){
		return "system/main";
	}
	
	//默认的左边框架menu
	@RequestMapping(value="/system_left",method = RequestMethod.GET)
	public String left(){
		return "system/default_left";
	}
	
	//广告的左边框架menu
	@RequestMapping(value="/advertise_left")
	public String advertise(){
		return "system/advertise_left";
	}
	
	@RequestMapping(value="/system_right",method = RequestMethod.GET)
	public String right(){
		return "system/right";
	}
	
	//登录错误
	@RequestMapping(value="/login" ,params="error")
	public String loginerror(String error,Model model){
		model.addAttribute("error", error);
		return "login";
	}
	
	@RequestMapping(value="/login")
	public String login(){
		return "login";
	}
}
